from audio_pkg.set_config.load_config import ConfigLoader,LoadConfigData
from audio_pkg.set_config.config import ConfigManager
from audio_pkg.mainprocess import MainProcess


def main():
    # 配置文件初始化
    config_manager = ConfigManager()
    config_manager.init_default_config()
    config_path = config_manager.config_path 
    
    #加载配置文件 
    config_loader = ConfigLoader(LoadConfigData(config_path))
    config = config_loader.load_config()

    #主程序
    app = MainProcess(config=config)
    app.run()
    
if __name__ == "__main__":
    #脚本入口
    main()
